/*
 * Copyright (c) 2020.
 */

package com.yihengyi.jmall.order;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author cc
 */
@SpringBootApplication
@RestController
@EnableFeignClients
@EnableResourceServer
public class OrderApplication {
	@Value("${order.setting}")
	private String orderSetting;

	@GetMapping("/order")
	public String order() {
		return orderSetting;
	}

	@Autowired
	private UserInterface userInterface;
	@GetMapping("/user")
	public String user() {
		return userInterface.user();
	}

	public static void main(String[] args) {
		SpringApplication.run(OrderApplication.class, args);
	}

}
